rendering: avoid primitive restart for Lua VAO model submissions - #3156
rendering: avoid primitive restart for Lua VAO model submissions#3156Kitrae wants to merge 1 commit into
Conversation
|
Hmm I do wonder why this was here in the first place... is it vestigial or there for some good reason (that we need to make sure is fixed in some other way)? Good find nonetheless! |
From what i can actually tell, Primitive restart was added to the generic |
|
hoping this could get approved? |
|
Going to let TK take a look, as he has more opengl knowledge. I haven't looked deeply at this yet. |
What changed:
LuaVAOImpl::Submit()no longer enables primitive restart around model multi draw submissions.The regular
LuaVAOImpl::DrawElements()path is unchanged and continues to support the primitive restart.Why:
Lua VAO model submissions use ordinary triangle lists and dont contain primitive restart indices.
Enabling primitive restart caused Zink to enter an extremely slow path when BARS custom unit shaders were active. Model rendering dropped the game to roughly 2-4 fps.
Removing the unnecessary state avoids that bottleneck without disabling CUS, changing any shaders, or introducing a zink specific fallback.
Tested:
Zink: BAR loaded with CUS enabled and full shaders, then rendered models without the previous severe framerate hit.
Native OpenGL on NVIDIA: CUS initialized, compiled, and rendered successfully.
RelWithDebInfo engine build completed